﻿using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using Simple.ISysService;
using Simple.Tools;
using SimpleSaas.Common;
using SimpleSaas.Entity.Dto;
using SimpleSaas.Web.Common;

namespace SimpleSaasUser.Controllers
{
	[Route("api/sys-tenant")]
	[ApiController]
	public class SysTenantController : BaseController
	{
		[Autowired]
		private ISysTenantService sysTenantService { get; set; }

		/// <summary>
		/// 
		/// </summary>
		/// <param name="tenantDto"></param>
		/// <returns></returns>
		[HttpPost()]
		public async Task<SimpleSaas.Common.BaseMessage> AddAsync([FromBody] SysTenantDto tenantDto)
		{
			await sysTenantService.AddAsync(tenantDto);
			return Ok200();
		}
	}
}